﻿using System;

namespace RaytracerLib.Postprocessing.LightCorrector
{
    public abstract class ToneMapper : Postprocessor
    {
        public static ToneMapper Create(ToneMappingMethod a_method)
        {
            if (a_method == ToneMappingMethod.ClipEachPixel)
                return new ClipEachPixelToneMapper();
            else if (a_method == ToneMappingMethod.ScaleAllLinear)
                return new ScaleAllLinearToneMapper();
            else if (a_method == ToneMappingMethod.ScaleEachPixel)
                return new ScaleEachPixelToneMapper();
            else if (a_method == ToneMappingMethod.Global)
                return new GlobalToneMapper();
            else
                throw new InvalidOperationException();
        }

        public abstract bool RequiredPostprocessingFinalization { get; }
    }
}